import time

 in [1] :file=open('m1_sorted.txt','r')


A= []
for i in open ( 'm1_sorted.txt' ):
   A.append (int (i) )
start1 = time. time()
swapped = True
while swapped:
 swapped = False
 for i in range (len (A)-1):
if A[i] > A[i+1]:
     A[i], A[i+1] = A[i+1], A[i]
 swapped = True
finish1 = time. time ()
 #for i in range (5000) :
# print(A[i], end=" ")
A = []
for i in open ( "m2_sorted.txt" ):
   A.append (int (i) )
   start2 = time. time()
swapped = True
while swapped:
   swapped = False
for i in range (len (A)-1):
 if A[i] > A[i+1]:
     A[i], A[i+1] = A[i+1], A[i]
swapped = Truefinish2 = time. time ()
#for i in range (5000) :print (A[i], end=" ")
A = []
for i in open ( "m3_sorted.txt" ):
    A.append (int (i) )
start3 = time. time ()
swapped = True
while swapped:
    swapped = False
for i in range (len (A)-1):
    if A[i] > A[i+1]:
   A[i], A[i+1] = A[i+1], A[i]
swapped = True
finish3 = time. time ()
#for i in range (5000) :
print (A[i], end=" ")

print ("m1_sorted.txt","m2_sorted.txt","m3_sorted.txt",round ( (finish1-start1) *1000/1000), "milliseconds")
